/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaclientcp3110.Model.Product;

import common.DAO.Factory.DAOFactory;
import common.Objects.Product;

/**
 *
 * @author Slasher
 */
public class ProductDeleteModel {
    private Product deleteProduct;

    public ProductDeleteModel() {
        deleteProduct = new Product();
    }

    public Product getDeleteProduct() {
        return deleteProduct;
    }
    public boolean deleteProduct() {
        if (deleteProduct != null) {
            return DAOFactory.getDAOFactory().getProductDAO().deleteProduct(deleteProduct.getId());
        }
        else {
            return false;
        }
    }
    public void setDeleteProduct(Product deleteProduct) {
        this.deleteProduct = deleteProduct;
    }



}
